#pragma once


#include "Containers/ThreadSafePtr.h"
#include "TextureFormat.h"

class CTexture2DPixels;

//managed by RTexture2D
class CRenderTexture2D
{

public:
    CRenderTexture2D();

    //main thread write data to this
    void SyncToRenderThread(
        const TVector<uint8_t>& InData,
        const uint32_t InWidth,
        const uint32_t InHeight,
        const uint32_t InPitch,
        ETextureFormat InFormat
    );

    TThreadSafeSharedPtr<CTexture2DPixels> GetWriteInTexture() const
    {
        return WriteInTexture;
    }

    uint32_t GetWidth() const;
    uint32_t GetHeight() const;
protected:

    TThreadSafeSharedPtr<CTexture2DPixels> WriteInTexture;
};